import Api from "@/api";

export default {
  state: {},
  getters: {},
  mutations: {},
  actions: {
    fetchAdminCategories() {
      return Api.get("/admin/category");
    },
    fetchBLogCategory() {
      return Api.get("/category");
    },
    addCategory(_, formData) {
      return Api.post("/admin/category", formData);
    },
    editCate(_, { formData, id }) {
      return Api.put("/admin/category/" + id, formData);
    },
    deleteCate(_, id) {
      return Api.del("admin/category/" + id);
    }
  }
};
